﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using NewsEntity.Models;
using NewsSevicer.ResultClass;

namespace NewsSevicer.Interface
{
    public interface IAdminServer
    {
       //intterface 接口规范
       /// <summary>
       /// 
       /// </summary>
       /// <param name="newsCommentId">新闻评论id</param>
       /// <returns></returns>
        bool DelectComment(int newsCommentId);


         /// <summary>
              /// 新闻评论显示
              /// </summary>
              /// <returns></returns>
       ResultData ResultCommentModel();
        /// <summary>
        /// 删除banner
        /// </summary>
        /// <param name="bannerManager"></param>
        /// <returns></returns>
        bool DelectBanner(BannerManager bannerManager);

        /// <summary>
        /// 获取banner
        /// </summary>
        /// <returns></returns>
       ResultData  GetBannerInfo(string url);
    
        /// <summary>
        /// 新闻类别的添加
        /// </summary>
        /// <param name="newsType"></param>
        /// <returns></returns>
        ResultData AdminAddNewsType(NewsType newsType);
        /// <summary>
        /// 拿新闻类别数据
        /// </summary>
        /// <returns></returns>
          ResultData GetNewsType();
        /// <summary>
        /// 添加banner
        /// </summary>
        /// <param name="bannerManager"></param>
        /// <returns></returns>
        bool AddBanner(BannerManager bannerManager);
        /// <summary>
        /// 删除新闻类别
        /// </summary>
        /// <param name="typeid"></param>
        /// <returns></returns>
        ResultData DeleteNewsType(int typeid);
        /// <summary>
        /// 添加新闻
        /// </summary>
        /// <param name="news"></param>
        /// <returns></returns>
        ResultData AddNews(News news);
        /// <summary>
        /// 管理员获取所有新闻
        /// </summary>
        /// <returns></returns>
        Object GetAdminNews();
       /// <summary>
       /// 假删除新闻
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
        int DelNews(News news);
        /// <summary>
        /// 真删除新闻
        /// </summary>
        /// <param name="news"></param>
        /// <returns></returns>
        int DelectNews(News news);
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="adminlogin"></param>
        /// <returns></returns>
        bool AdminLogin(Adminlogin adminlogin);
        /// <summary>
        /// 方法分页
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        ResultPaging NewsPaging(int pageindex, int pageSize);
        /// <summary>
        /// 获取某个新闻分类下的新闻
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<News> GetTypeNews(int id);
        /// <summary>
        /// 获取编辑新闻的数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ResultData GetEditNews(int id,string ip=""  );

        /// <summary>
        /// 编辑新闻
        /// </summary>
        /// <param name="news"></param>
        /// <returns></returns>
        bool EditNews(News news);

        bool EditNewsImages(News news);

        bool EditNewsContent(News news);

        List<string> GetNewsimages(int id );
        string GetNewsimagesStr(int id);
    }
}
